package cn.ljlao.mall.product.goods.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: LiuZhen
 * @Created: 2021/8/7 15:08
 * @Description:
 */
@Configuration
public class RedisSonConfig {

    @Bean
    public RedissonClient redissonClient(){

        Config config = new Config();
        config.useSingleServer().setAddress("redis://159.75.112.5:6379")
                                .setPassword("lz990508");
        return Redisson.create(config);
    }
}
